package com.polymorphismodeldemo3;

/**
 * @Auther: shiquan
 * @Date: 2024/10/21 - 10 - 21 -20:18
 */
public class Animal {
    /*
    年龄  颜色
    行为 eat(String something) (something 表示吃的东西)
     */

    private int age;
    private String color ;

    public Animal() {
    }

    public Animal(int age, String color) {
        this.age = age;
        this.color = color;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public void eat(String something){
        System.out.println("动物在吃something");
    }
}
